'''

'''


class Cmd:
    def __init__(self):
        self.cpOption = None
        self.xjreOption = None
        self.Class = None
        self.Args = None

    def parseCmd(self, args):
        newArgs = self.removeSpace(args)
        self.Class = newArgs[0]
        otherArgs = newArgs[1:]
        for i in range(0, len(otherArgs)):
            arg = otherArgs[i]
            if arg == '-cp' or arg == '--classpath':
                self.cpOption = otherArgs[i + 1]
            elif arg == '--xjre':
                self.xjreOption = otherArgs[i + 1]
        return self

    def removeSpace(self, args):
        newArgs = []
        for arg in args:
            if arg == None:
                continue
            elif arg == '':
                continue
            elif len(str(arg).strip()) == 0:
                continue
            newArgs.append(arg)
        return newArgs
